package com.wing.cabinet.model.request;

import com.wing.cabinet.model.entity.CabinetCargoSpace;
import com.wing.cabinet.model.entity.StorageInventoryKnife;
import com.wing.cabinet.model.entity.UseInventoryInoutDetail;
import com.wing.cabinet.model.response.CabSortInventorySpaceVO;
import com.wing.cabinet.model.response.CellInventorySpaceVO;
import com.wing.cabinet.model.response.StorageInventorySpaceVO;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.*;

/**
 * 售刀柜领取/暂存柜上/暂存/维修/回收明细Form
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class UseInventoryInoutDetailForm {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 售刀柜领取/暂存柜上/暂存/维修/回收任务id
     */
    private Long inoutId;

    /**
     * 柜子id
     */
    private Long cabId;

    /**
     * sku id
     */
    private Long skuId;

    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 企业id
     */
    private Long companyId;

    /**
     * 货道/库位id
     */
    private Long spaceId;

    /**
     * 操作类型
     */
    private UseInventoryInoutDetail.Type type;

    /**
     * sku code
     */
    private String skuCode;

    /**
     * 柜子编码
     */
    private String cabCode;

    /**
     * 货道/货位编码
     */
    private String spaceCode;

    /**
     * 当前库存
     */
    private Integer quantityCurrent;

    /**
     * 变动后库存
     */
    private Integer quantityAfter;


    public interface Add{}

    public interface Update{}

    private UseInventoryInoutDetail.BusinessType businessType;

    /**
     * personal：专人存储，common：公共存贮，specialClass：专类存贮，repair：维修存贮，recycle:回收报废存储
     */
    private CabinetCargoSpace.SpaceNature storageType;

    private Long productTypeId;

    private String deviceCode;

    private String labelCode;

    private String checkCabCode;

    private String checkSpaceCode;

    private Long workOrderId;

    private CabinetCargoSpace.SpaceType spaceType;

    /**
     * 企业编码
     */
    private String enterpriseCode;

    private Integer useTime;

    private Integer remainingTime;

    private StorageInventoryKnife.LifeUnit lifeUnit;

    private Integer settingTime;

    private BigDecimal price;

    private BigDecimal total;

    private List<String> skuCodes;

    private List<UseInventoryInoutDetailForm> detailList;

    private List<CellInventorySpaceVO> laneList;

    private Map<String,List<CellInventorySpaceVO>> cabSpacesMap = new HashMap<String,List<CellInventorySpaceVO>>();

    private Set<String> cabCodesSet = new HashSet<String>();

    private List<CellInventorySpaceVO> resultLaneList;

    private List<CabSortInventorySpaceVO> sortCabList;

    private Integer quantityResult;

    private Long processId;

    private String remark;

    private Long categoryId;

    private List<StorageInventorySpaceVO> storageSpaceList;

    private List<StorageInventorySpaceVO> resultStorageSpaceList;

    private Map<String,List<StorageInventorySpaceVO>> cabStorageSpacesMap = new HashMap<String,List<StorageInventorySpaceVO>>();


    private Long storageInventoryInoutDetailId;


    private Integer quantityTarget;


    private Integer quantityExist;

    private Integer quantitySurplus;


    private Boolean hasTargetQuantity;

    private Boolean isEmpty;

    private Integer quantityByLane;

    private Integer quantityBySpace;

    private List<Integer> quantityTargetList=new ArrayList<>();

    private List<Integer> quantitySurplusList=new ArrayList<>();

    private List<Integer> quantityExistList=new ArrayList<>();

    private Integer quantityProductCurrent;

    private Integer quantityProductAfter;

    private Long useInventoryUserId;

    private Integer quantitySingleCabCurrent;

    private Integer quantitySingleCabAfter;

    private Integer quantityCabCurrent;

    private Integer quantityCabAfter;

    private String mainCabCode;

    private Integer quantityPack;

    private Integer quantityPackUnit;


    private Long packId;

    private String packName;

    private String unitName;

    private String parentLabelCode;

    private Integer quantityPackCurrent;

    private Integer quantityPackAfter;


    private Integer quantityPackSingleCabCurrent;

    private Integer quantityPackSingleCabAfter;


    private Integer quantityPackCabCurrent;

    private Integer quantityPackCabAfter;


}
